{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Variable transformers : YeoJohnsonTransformer\n",
    "\n",
    "The YeoJohnsonTransformer() applies the Yeo-Johnson transformation to the\n",
    "numerical variables.\n",
    "\n",
    "**For this demonstration, we use the Ames House Prices dataset produced by Professor Dean De Cock:**\n",
    "\n",
    "Dean De Cock (2011) Ames, Iowa: Alternative to the Boston Housing\n",
    "Data as an End of Semester Regression Project, Journal of Statistics Education, Vol.19, No. 3\n",
    "\n",
    "http://jse.amstat.org/v19n3/decock.pdf\n",
    "\n",
    "https://www.tandfonline.com/doi/abs/10.1080/10691898.2011.11889627\n",
    "\n",
    "The version of the dataset used in this notebook can be obtained from [Kaggle](https://www.kaggle.com/c/house-prices-advanced-regression-techniques/data)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "from sklearn.model_selection import train_test_split\n",
    "\n",
    "from feature_engine.imputation import ArbitraryNumberImputer\n",
    "from feature_engine.transformation import YeoJohnsonTransformer"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Id</th>\n",
       "      <th>MSSubClass</th>\n",
       "      <th>MSZoning</th>\n",
       "      <th>LotFrontage</th>\n",
       "      <th>LotArea</th>\n",
       "      <th>Street</th>\n",
       "      <th>Alley</th>\n",
       "      <th>LotShape</th>\n",
       "      <th>LandContour</th>\n",
       "      <th>Utilities</th>\n",
       "      <th>...</th>\n",
       "      <th>PoolArea</th>\n",
       "      <th>PoolQC</th>\n",
       "      <th>Fence</th>\n",
       "      <th>MiscFeature</th>\n",
       "      <th>MiscVal</th>\n",
       "      <th>MoSold</th>\n",
       "      <th>YrSold</th>\n",
       "      <th>SaleType</th>\n",
       "      <th>SaleCondition</th>\n",
       "      <th>SalePrice</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>60</td>\n",
       "      <td>RL</td>\n",
       "      <td>65.0</td>\n",
       "      <td>8450</td>\n",
       "      <td>Pave</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Reg</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>2008</td>\n",
       "      <td>WD</td>\n",
       "      <td>Normal</td>\n",
       "      <td>208500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>20</td>\n",
       "      <td>RL</td>\n",
       "      <td>80.0</td>\n",
       "      <td>9600</td>\n",
       "      <td>Pave</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Reg</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "      <td>2007</td>\n",
       "      <td>WD</td>\n",
       "      <td>Normal</td>\n",
       "      <td>181500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>60</td>\n",
       "      <td>RL</td>\n",
       "      <td>68.0</td>\n",
       "      <td>11250</td>\n",
       "      <td>Pave</td>\n",
       "      <td>NaN</td>\n",
       "      <td>IR1</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "      <td>2008</td>\n",
       "      <td>WD</td>\n",
       "      <td>Normal</td>\n",
       "      <td>223500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>70</td>\n",
       "      <td>RL</td>\n",
       "      <td>60.0</td>\n",
       "      <td>9550</td>\n",
       "      <td>Pave</td>\n",
       "      <td>NaN</td>\n",
       "      <td>IR1</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>2006</td>\n",
       "      <td>WD</td>\n",
       "      <td>Abnorml</td>\n",
       "      <td>140000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>60</td>\n",
       "      <td>RL</td>\n",
       "      <td>84.0</td>\n",
       "      <td>14260</td>\n",
       "      <td>Pave</td>\n",
       "      <td>NaN</td>\n",
       "      <td>IR1</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>12</td>\n",
       "      <td>2008</td>\n",
       "      <td>WD</td>\n",
       "      <td>Normal</td>\n",
       "      <td>250000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 81 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   Id  MSSubClass MSZoning  LotFrontage  LotArea Street Alley LotShape  \\\n",
       "0   1          60       RL         65.0     8450   Pave   NaN      Reg   \n",
       "1   2          20       RL         80.0     9600   Pave   NaN      Reg   \n",
       "2   3          60       RL         68.0    11250   Pave   NaN      IR1   \n",
       "3   4          70       RL         60.0     9550   Pave   NaN      IR1   \n",
       "4   5          60       RL         84.0    14260   Pave   NaN      IR1   \n",
       "\n",
       "  LandContour Utilities  ... PoolArea PoolQC Fence MiscFeature MiscVal MoSold  \\\n",
       "0         Lvl    AllPub  ...        0    NaN   NaN         NaN       0      2   \n",
       "1         Lvl    AllPub  ...        0    NaN   NaN         NaN       0      5   \n",
       "2         Lvl    AllPub  ...        0    NaN   NaN         NaN       0      9   \n",
       "3         Lvl    AllPub  ...        0    NaN   NaN         NaN       0      2   \n",
       "4         Lvl    AllPub  ...        0    NaN   NaN         NaN       0     12   \n",
       "\n",
       "  YrSold  SaleType  SaleCondition  SalePrice  \n",
       "0   2008        WD         Normal     208500  \n",
       "1   2007        WD         Normal     181500  \n",
       "2   2008        WD         Normal     223500  \n",
       "3   2006        WD        Abnorml     140000  \n",
       "4   2008        WD         Normal     250000  \n",
       "\n",
       "[5 rows x 81 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# load data\n",
    "\n",
    "data = pd.read_csv('houseprice.csv')\n",
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "((1022, 79), (438, 79))"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# let's separate into training and testing set\n",
    "\n",
    "X_train, X_test, y_train, y_test = train_test_split(\n",
    "    data.drop(['Id', 'SalePrice'], axis=1), data['SalePrice'], test_size=0.3, random_state=0)\n",
    "\n",
    "X_train.shape, X_test.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "YeoJohnsonTransformer(variables=['LotArea', 'GrLivArea'])"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# initialize transformer to transform 2 variables\n",
    "\n",
    "yjt = YeoJohnsonTransformer(variables = ['LotArea', 'GrLivArea'])\n",
    "\n",
    "# find otpimal lambdas for the transformation\n",
    "yjt.fit(X_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'LotArea': 0.02258978732751055, 'GrLivArea': 0.06781061353154169}"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# these are the lambdas for the YeoJohnson transformation\n",
    "\n",
    "yjt.lambda_dict_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "# transform variables\n",
    "\n",
    "train_t = yjt.transform(X_train)\n",
    "test_t = yjt.transform(X_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0.5, 0, 'GrLivArea')"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAEWCAYAAAB/tMx4AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Il7ecAAAACXBIWXMAAAsTAAALEwEAmpwYAAAYfklEQVR4nO3df5RdZX3v8ffX8CNA0vDTWZjkEqwUCo0/YBbipVcngIKgQtfFXryoidKmWkWsWEHt9dfFil2tSG9bLYoVrkJAtELp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3rY3RuAG8rPjnWJCF87mnD+EaoWRwBPZ+ZnRwoy877M/D8RsSgiroiI62guGOooIr4YESdGxDER8ZWW8qGWe1EH8HpgEfDKiJheyueVe01fSHMxztyI+POI+EE09zL/aMv2vl7eIayMiMX9bQZpAwNctTgIuGmU5QcDJ2bmK3rY1jXASyNilzL/P2juxQHwX4F7M/NuYJjmVqcj9gP+ITMPAvYv84cCLwYOiYiXl/XeWt4hDALviog9eqiTtMkMcFUpIv4+mm+4+UEpujoz2+/R3lE2tyL9JvDaMuRyHBvut/EGNoT5Ep49jHJfNvcth+b+LK+iuUT+Jpq7C+5Xlr0rIn4I3Ehzk6X9kMZB1/FCaZJZCfz3kZnMfEdE7AksK0VPbuL2lgDvpPlijmWZ+URETCv7OD4iPkhzr5Y9ImJmh30E8InM/MfWjUbEEHAU8LLM/GVEDNPcw0PqO3vgqsV1wPSIeHtL2c5bsL1v0wy7/DEbetxHArdm5tzMnJeZ+9DcGnejM11o7o741nLvcyJidkQ8l+YWp4+W8D6A5qvTpHFhgKsK2dx17QTgFRFxb0R8n+brtc7o8pT9I+L+lsfr27b3DHAl8OryE5rhkn9u285X6XA2SmZ+i+Z7HL8XEStovuJrJs3QzHYRcQdwNs0wijQuvBuhJFXKHrgkVcoAl6RKGeCSVCkDXJIqZYBLUqUMcEmqlAEuSZX6/7bsZE0ceeJSAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# variable before transformation\n",
    "X_train['GrLivArea'].hist(bins=50)\n",
    "plt.title('Variable before transformation')\n",
    "plt.xlabel('GrLivArea')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0.5, 0, 'GrLivArea')"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png":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AJekRhngktQoA1ySGmWAS1Kj/j9QdU6u4nIjtwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# transformed variable\n",
    "train_t['GrLivArea'].hist(bins=50)\n",
    "plt.title('Transformed variable')\n",
    "plt.xlabel('GrLivArea')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0.5, 0, 'LotArea')"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEWCAYAAACdaNcBAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Il7ecAAAACXBIWXMAAAsTAAALEwEAmpwYAAAY3UlEQVR4nO3de5RmVXnn8e8jzb2xG2zsabp7KFDUoCBCD8LSmAK8cDGBrIUKg9BNyHRM0NERRxpxRnRI0mYSMS4zKAQG8EJDNAQCGlSg4sIEsFvut9AwhdByEYSGQoiCz/xxdumheN+6dNd19/ez1rvqnL332Wef/b7vr06d91KRmUiS6vKyqR6AJGn8Ge6SVCHDXZIqZLhLUoUMd0mqkOEuSRUy3EVEDETErqNo1xMRGRGzutSfFhFf3cAx9EfE2zdw29dGxE0R8XRE/NcN6WOmiIjfj4gHyn32pqkez1ARcXtE9E71OGS4zzgR8U8R8ZkO5YdHxMPdgnc4mTk7M+8bnxFOiY8D12Tmdpn5hYncUUQsi4hrJ3IfI/hL4IPlPrtxCsdBRJwXEae3yzLz9ZnZN0VDUovhPvOcD7w/ImJI+bHA1zLz+dF2tCG/CKapnYHbN2TDiZiDiNhsvPts2ZhjnchxabrJTG8z6AZsDawH3tYq2x54DngjsC/wr8CTwEPAF4EtWm0TOBG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ZeazEbGY5tOcN9B8j/n7Wn1sS/P93m+k+Q6V9wFvycy9gBeAY0q7UzNzCbAn8DsRseckHJ/0a4a7NgkRMQeYm5n/XIrOp/kHF528jybUAVbx4kszL9B8ARXAQcA+wA8j4qayvmupe29E/Ai4EXg9zT+HkCbNrJGbSJuco4H/EBGDZ+E7RcRumXkP8FxmvlDKAzg/M09pb1y+jOtjwH/KzCci4jya72CRJo1n7tokZOZ64ImI+O1SdCwweBb/NM2/XyMiXgPMzsyFmdmTmT3An9P5hdWrgCMj4pVl2x0iYmfg5cAzwPqImE/zXfzSpPLMXbXaJiLa/x3nczRfufqliNiG5v9fHl/qzivlz9J8Z/4lQ/r6JnAR8Jl2YWbeERGfpPlPWS+j+UbGEzPzuoi4EbiL5j/3/GBcj0waBb8VUpIq5GUZSaqQ4S5JFTLcJalChrskVchwl6QKGe6SVCHDXZIq9P8B4yS+3dnpwE4AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# tvariable before transformation\n",
    "X_train['LotArea'].hist(bins=50)\n",
    "plt.title('Variable before transformation')\n",
    "plt.xlabel('LotArea')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0.5, 0, 'LotArea')"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEWCAYAAACdaNcBAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Il7ecAAAACXBIWXMAAAsTAAALEwEAmpwYAAAdyUlEQVR4nO3de5xdZX3v8c9XIhAymIDBEZLIUI0oJGDNFPFwtDNiKwI1nB4vcEATxaa0iKjxcBFPUQ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kyt0r6MdnlLg4FDmnAyzCr2pR2F2A2AZ0EvFDSyF74AZLmRsTdwG8iYuSSywJWRcSz7mok6SDgg8AfRcSjklYCHXVrR+t83nO3SSEitgOPSnpNmvV2srtaATwO7A0g6aVAV0TMyl3J7+OU/2B1DfDm3FU795V0IPA84Algu6Ru4I1NellmFXnP3YpqL0n356Y/TXap4X9KN1C4B3hnWrYyzd8BfC195X0F+DLwsfzMiLhD0oeB6yU9h+yqnadHxFpJt5BdlnYz8P2GvjKzKviqkGZmBeRhGTOzAnK4m5kVkMPdzKyAHO5mZgXkcDczKyCHu5lZATnczcwK6D8BIY9CY3ojNegAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# transformed variable\n",
    "train_t['LotArea'].hist(bins=50)\n",
    "plt.title('Variable before transformation')\n",
    "plt.xlabel('LotArea')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Automatically select numerical variables\n",
    "\n",
    "Before using YeoJohnsonTransformer we need to ensure that numerical variables do not have missing data."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "# impute missing data\n",
    "\n",
    "arbitrary_imputer = ArbitraryNumberImputer(arbitrary_number=2)\n",
    "\n",
    "arbitrary_imputer.fit(X_train)\n",
    "\n",
    "train_t = arbitrary_imputer.transform(X_train)\n",
    "test_t = arbitrary_imputer.transform(X_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\Sole\\Documents\\Repositories\\envs\\fenotebook\\lib\\site-packages\\numpy\\core\\_methods.py:205: RuntimeWarning: overflow encountered in multiply\n",
      "  x = um.multiply(x, x, out=x)\n",
      "C:\\Users\\Sole\\Documents\\Repositories\\envs\\fenotebook\\lib\\site-packages\\scipy\\optimize\\optimize.py:2149: RuntimeWarning: invalid value encountered in double_scalars\n",
      "  tmp2 = (x - v) * (fx - fw)\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "YeoJohnsonTransformer()"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# intializing transformer to transform all variables\n",
    "\n",
    "yjt = YeoJohnsonTransformer()\n",
    "\n",
    "yjt.fit(train_t)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Note, the run time error is because we are trying to transform integers."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['MSSubClass',\n",
       " 'LotFrontage',\n",
       " 'LotArea',\n",
       " 'OverallQual',\n",
       " 'OverallCond',\n",
       " 'YearBuilt',\n",
       " 'YearRemodAdd',\n",
       " 'MasVnrArea',\n",
       " 'BsmtFinSF1',\n",
       " 'BsmtFinSF2',\n",
       " 'BsmtUnfSF',\n",
       " 'TotalBsmtSF',\n",
       " '1stFlrSF',\n",
       " '2ndFlrSF',\n",
       " 'LowQualFinSF',\n",
       " 'GrLivArea',\n",
       " 'BsmtFullBath',\n",
       " 'BsmtHalfBath',\n",
       " 'FullBath',\n",
       " 'HalfBath',\n",
       " 'BedroomAbvGr',\n",
       " 'KitchenAbvGr',\n",
       " 'TotRmsAbvGrd',\n",
       " 'Fireplaces',\n",
       " 'GarageYrBlt',\n",
       " 'GarageCars',\n",
       " 'GarageArea',\n",
       " 'WoodDeckSF',\n",
       " 'OpenPorchSF',\n",
       " 'EnclosedPorch',\n",
       " '3SsnPorch',\n",
       " 'ScreenPorch',\n",
       " 'PoolArea',\n",
       " 'MiscVal',\n",
       " 'MoSold',\n",
       " 'YrSold']"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# variables that will be transformed\n",
    "# (these are the numerical variables in the dataset)\n",
    "\n",
    "yjt.variables_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'MSSubClass': -0.2378306859381657,\n",
       " 'LotFrontage': 0.8125118353085222,\n",
       " 'LotArea': 0.02258978732751055,\n",
       " 'OverallQual': 0.8643396718133388,\n",
       " 'OverallCond': 0.3969558337988488,\n",
       " 'YearBuilt': 22.190602427177428,\n",
       " 'YearRemodAdd': 39.78218820691653,\n",
       " 'MasVnrArea': -0.25239760257649463,\n",
       " 'BsmtFinSF1': 0.2366258546377551,\n",
       " 'BsmtFinSF2': -1.4342285901348042,\n",
       " 'BsmtUnfSF': 0.48006245124988,\n",
       " 'TotalBsmtSF': 0.7956604221557544,\n",
       " '1stFlrSF': 0.02379301178012459,\n",
       " '2ndFlrSF': -0.11762285496291223,\n",
       " 'LowQualFinSF': -9.792554984978894,\n",
       " 'GrLivArea': 0.06781061353154169,\n",
       " 'BsmtFullBath': -1.6227232190570056,\n",
       " 'BsmtHalfBath': -25.604493651416906,\n",
       " 'FullBath': 0.7799203671146958,\n",
       " 'HalfBath': -2.204536108690803,\n",
       " 'BedroomAbvGr': 0.8360057761170219,\n",
       " 'KitchenAbvGr': -1.594528611751712,\n",
       " 'TotRmsAbvGrd': 0.13886712654681466,\n",
       " 'Fireplaces': -0.3289777349413731,\n",
       " 'GarageYrBlt': 2.844211228808113,\n",
       " 'GarageCars': 1.3847317293866424,\n",
       " 'GarageArea': 0.8241205521050128,\n",
       " 'WoodDeckSF': -0.09933941199949706,\n",
       " 'OpenPorchSF': 0.00882850937230263,\n",
       " 'EnclosedPorch': -1.3484255768857674,\n",
       " '3SsnPorch': -11.660518913094377,\n",
       " 'ScreenPorch': -2.30942436747328,\n",
       " 'PoolArea': -53.219699359215674,\n",
       " 'MiscVal': -3.612316196644568,\n",
       " 'MoSold': 0.723241223747494,\n",
       " 'YrSold': -2.72135950034568}"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# these are the parameters for YeoJohnsonTransformer\n",
    "\n",
    "yjt.lambda_dict_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "# transform  variables\n",
    "train_t = yjt.transform(train_t)\n",
    "test_t = yjt.transform(test_t)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "fenotebook",
   "language": "python",
   "name": "fenotebook"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.2"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
